Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doubly linked freelist fix #44585

Merged
merged 10 commits into from
Nov 13, 2020

Conversation

PeterSolMS
Copy link
Contributor

In gc_heap::allocate_uoh_object. we set the background mark bit if the new object is in a range that has the corresponding portions of the background mark_array committed.

However, if the object is in a segment that is allocated during background_sweep, we won't actually sweep the segment, and so the background mark bit stays on, causing confusion in the next background GC - the object itself will survive, but we won't keep the objects that it points at, so we'll have heap corruption.

Details:

In gc_heap::allocate_uoh_object. we set the background mark bit if the new object is in a range that has mark bits committed.

However, if the object is in a segment that is allocated during background_sweep, we won't actually sweep the segment, and so the background mark bits stays on, causing confusion in the next background GC - the object itself will survive, but we won't keep the objects that it points at, so we'll have heap corruption.
@ghost
Copy link

ghost commented Nov 12, 2020

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.


Issue meta data
Issue content:
In gc_heap::allocate_uoh_object. we set the background mark bit if the new object is in a range that has the corresponding portions of the background mark_array committed.

However, if the object is in a segment that is allocated during background_sweep, we won't actually sweep the segment, and so the background mark bit stays on, causing confusion in the next background GC - the object itself will survive, but we won't keep the objects that it points at, so we'll have heap corruption.

</td>
Issue author: PeterSolMS
Assignees: -
Labels:
`area-GC-coreclr`

</td>
Milestone: -

@PeterSolMS PeterSolMS merged commit 9f4650a into dotnet:master Nov 13, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants